package Test;

import javax.swing.*;
import java.awt.*;

public class FlowLayOutTest {
    private  static void Test04(){
        JFrame frame = new JFrame("FLOW");
        frame.setLayout(new FlowLayout(FlowLayout.LEFT,20,20));
        frame.setSize(300,300);
        frame.setLocation(200,200);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

        frame.add(new JButton("1"));
        frame.add(new JButton("2"));
        frame.add(new JButton("3"));
        frame.add(new JButton("4"));
        frame.add(new JButton("5"));
        frame.add(new JButton("1"));
        frame.add(new JButton("2"));
        frame.add(new JButton("3"));
        frame.add(new JButton("4"));
        frame.add(new JButton("5"));
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(FlowLayOutTest::Test04);
    }
}
